home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Softdisk Supreme
/
Softdisk Supreme.iso
/
pc
/
DSK Files
/
0-49
/
SD008b.dsk
/
STARS.bas
< prev
next >
Wrap
BASIC Source File
|
2003-06-12
|
3KB
|
76 lines
50 HOME : VTAB 7: HTAB 12
55 PRINT "*** STARS ***"
60 PRINT : PRINT : HTAB 12: PRINT "BROUGHT TO YOU"
65 PRINT : PRINT : HTAB 18: PRINT "BY"
70 PRINT : PRINT : HTAB 10
72 PRINT "COMPUTER ADVENTURES"
75 PRINT : PRINT : HTAB 14: PRINT "SUMMER, 1981"
100 VTAB 24: INPUT "PRESS RETURN TO CONTINUE ";RR$
150 A = 100:M = 7
160 HOME : VTAB 5: HTAB 5
165 PRINT "DO YOU WANT INSTRUCTIONS?"
170 PRINT : HTAB 15: INPUT A$
180 IF LEFT$(A$,1) = "N" THEN 310
200 REM ** INSTRUCTIONS **
210 HOME : VTAB 5: HTAB 5
215 PRINT "I AM THINKING OF A NUMBER FROM"
220 PRINT : HTAB 5: PRINT "1 TO ";A". TRY TO GUESS MY NUMBER."
230 PRINT : HTAB 5: PRINT "AFTER YOU GUESS, I WILL TYPE "
240 PRINT : HTAB 5: PRINT "ONE OR MORE STARS (*). THE MORE "
250 PRINT : HTAB 5: PRINT "STARS I TYPE, THE CLOSER YOU "
260 PRINT : HTAB 5: PRINT "ARE TO MY NUMBER. ONE STAR "
270 PRINT : HTAB 5: PRINT "(*) MEANS FAR, FAR AWAY. SEVEN"
280 PRINT : HTAB 5: PRINT "STARS (*******) MEANS REALLY"
290 PRINT : HTAB 5: PRINT "CLOSE. YOU GET ";M;" GUESSES."
300 PRINT : PRINT : INPUT "PRESS RETURN TO CONTINUE ";RR$
310 X = INT(A * RND(1) +1)
320 HOME : VTAB 5: HTAB 5
330 PRINT "OK, I'M THINKING OF A NUMBER."
340 PRINT : HTAB 5: PRINT "YOU TYPE IN YOUR GUESS FROM 1"
350 PRINT : HTAB 5: PRINT "TO ";A;"."
360 FOR K = 1 TO M
370 PRINT : HTAB 10: INPUT "YOUR GUESS ";G
380 IF G = X THEN 600
385 D = ABS(G -X)
390 IF D > = 64 THEN 510
400 IF D > = 32 THEN 500
410 IF D > = 16 THEN 490
420 IF D > = 8 THEN 480
430 IF D > = 4 THEN 470
440 IF D > = 2 THEN 460
444 :
445 REM PRINT CHR$(7) WILL RING THE BELL
446 :
450 PRINT "*"; CHR$(7);
460 PRINT "*"; CHR$(7);
470 PRINT "*"; CHR$(7);
480 PRINT "*"; CHR$(7);
490 PRINT "*"; CHR$(7);
500 PRINT "*"; CHR$(7);
502 :
503 REM THE TRAILING SEMI-COLON
504 REM IS VERY IMPORTANT. TRY
505 REM RUNNING THE PROGRAM
506 REM WITHOUT IT.
507 :
510 PRINT "*";
520 PRINT : NEXT K
560 PRINT : HTAB 5: PRINT "SORRY, BUT THAT WAS ";M;" GUESSES."
570 PRINT : HTAB 5: PRINT "THE NUMBER WAS ";X
580 PRINT : INPUT "PRESS RETURN TO CONTINUE ";RR$
590 GOTO 680
600 FOR N = 1 TO 80
610 PRINT "*";: NEXT N
630 PRINT : HTAB 18: PRINT "!!!!!"
640 PRINT : HTAB 5: PRINT "YOU GOT IT IN ";K;" GUESSES."
650 PRINT : PRINT : FOR N = 1 TO 80
660 PRINT "*";: NEXT N
670 VTAB 22: INPUT "PRESS RETURN TO CONTINUE ";RR$
680 HOME : VTAB 5: HTAB 5
690 PRINT "DO YOU WANT TO PLAY AGAIN? "
695 PRINT
700 HTAB 15: INPUT AE$
710 IF LEFT$(AE$,1) = "Y" THEN GOTO 310
720 PRINT : HTAB 5: PRINT "I HOPE YOU ENJOYED THIS GAME "
730 PRINT : HTAB 5: PRINT "FROM COMPUTER ADVENTURES TODAY."
740 PRINT : PRINT : HTAB 16: PRINT "GOOD BYE"